package com.aos.erp.schools.service.division;

import com.aos.erp.common.bean.IPageBean;
import com.aos.erp.common.bean.PageBean;
import com.aos.erp.common.bean.ResultEntity;
import com.aos.erp.common.exception.BizException;
import com.aos.erp.schools.model.division.entity.Division;
import com.aos.erp.schools.model.division.ro.AddDivisionRo;
import com.aos.erp.schools.model.division.ro.InfoDivisionRo;
import com.aos.erp.schools.model.division.ro.QueryDivisionRo;
import com.aos.erp.schools.model.division.ro.UpdateDivisionRo;
import com.aos.erp.schools.model.division.vo.ShowDivisionVo;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;

/**
 * <p>
 * 省市对应分所 服务类
 * </p>
 *
 * @author chb
 * @since 2018-10-31
 */
public interface DivisionService extends IService<Division> {
	/**
	 * 创建分所数据
	 *
	 * @param division
	 * @throws Exception
	 */
	ResultEntity addBean(List<AddDivisionRo> division,String currentUserId) throws Exception;
	/**
	 * 逻辑删除分所数据
	 *
	 * @param id  分所ID
	 */
	ResultEntity deleteDivision(String id);

	/**
	 * 修改车管所
	 *
	 * @param addDivisionRoList  车管所对象json数组
	 */
	ResultEntity updateDivision(List<UpdateDivisionRo> addDivisionRoList) throws BizException;

	/**
	 * 获取当市下面的分所
	 *
	 * @param cityId  城市id
	 */
	List<InfoDivisionRo> divisionInfo(Long cityId);

	IPageBean<ShowDivisionVo> findByPage(QueryDivisionRo queryDivisionRo);

	/**
	 * 根据Id获取车管所
	 *
	 * @param id  车管所ID
	 */
	 Division info(Long id);

	/**
	 * 根据depCode获取车管所
	 *
	 * @param depCode  车管所depCode
	 */
	Division infoByDepCode(String depCode);
}
